<?php

namespace SisGG\FinalBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CuitType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('tipoglobal', null, array(
                'invalid_message' => 'Debe ingresar dos números.',
               'label' => 'Tipo Global (##-)',
                    ))
            ->add('numero',null, array(
                'invalid_message' => 'Debe ingresar al menos 8 números.',
               'label' => 'Número (-########-)' ,
                ))
            ->add('verificador', null, array(
                'invalid_message' => 'Debe ingresar al menos 1 número.',
               'label' => 'Verificador (-#)',
                ))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'SisGG\FinalBundle\Entity\Cuit'
        ));
    }

    public function getName()
    {
        return 'sisgg_finalbundle_cuittype';
    }
}
